<!--组件-指南Cell-->
<template>
  <div class="cell">

    <div class="title" @click="openClick">
      <text class="font32 text2">{{title}}</text>
      <div class="all"></div>
      <LImage class="img-arrow" :src="Config.img(open ? 'v2_jiantou_shang.png' : 'v2_jiantou_xia.png')"></LImage>
    </div>

    <div class="cell-text" v-if="open">
      <div v-for="(item, index) in datas" v-bind:key="index" @click="infoClick(item)">
        <text class="font28 text2 text">{{'·  '+item.title}}</text>
      </div>
    </div>
    <div class="line bg4"></div>
  </div>
</template>
    
<style src="@/_css/style.css" ></style>
<style scoped>
.cell {
  padding-left: 40px;
}
.line{
  height: 1px;
}

/********** 标题 */
.title {
  flex-direction: row;
  align-items: center;
  height: 112px;
}
.img-arrow{
  width:20px;
  height:12px;
  margin-right: 40px;
}

/********** 文本 */
.cell-text {
  margin-left: 20px;
}
.text{
  width: 630px;
  height: 52px;
  line-height: 52px;

  lines: 1;
  text-overflow: ellipsis;

  margin-bottom: 30px;
}
</style>

<script>
//功能
import jconfig from "@/_js/config";

export default {
  
  model:{
    prop:"open",
    event:"change",
  },
  
  props: {
    title: Object, 
    datas: Array,
    open: Boolean,
  },

  data() {
    return {
      Config:jconfig,
    };
  },

  created() {
  },

  methods: {

    /********************************** 点击触发*/
    //展开点击
    openClick(){
      this.open = !this.open;
      this.$emit("change", this.open); 
    },

    //标题点击
    infoClick(item) {
      this.$emit("info", item);
    },
  },
};
</script>
